<?php
namespace Common\Model;
use Common\Model\AiModel;
class AdminLogModel extends AiModel {
    public function addLog($log){
        $info = array(
            'ht_admin'   => $log['ht_admin']?$log['ht_admin']:'JjAdmin',
            'admin_id'   => $_SESSION['ADMIN_ID'],
            'admin_type' => $_SESSION['ADMIN_TYPE'],
            'admin_name' => $_SESSION['ADMIN_NAME'],
            'controller' => $log['controller'],
            'action'     => $log['action'],
            'add_time'   => time(),
            'add_ip'     => get_client_ip(),
            'content'    => $log['content']
            );
        D('AdminLog')->add($info);
    }
}